<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MOON</title>
<link rel="stylesheet" th:href="@{/moon/css/bootstrap.css}" />
<link rel="stylesheet" th:href="@{/icon/css/font-awesome.min.css}" />
</head>
<body class="bg-a">
	<div class="container-fluid" id="app">
		<div class="row">
			<div class="col text-center bg-warning text-white shadow">js测试</div>
		</div>
	</div>
	<!-- js -->
	<script th:src="@{/moon/js/jquery.js}"></script>
	<script th:src="@{/moon/js/vue.js}"></script>
	<script th:src="@{/layer/layer.js}"></script>
	<script th:inline="javascript">
		//
		/*js函数自调用方法1
		(function f(){
			alert("1");
		})();
		方法2
		var f = function(){alert("1");}
		f();
		方法3
		!function f(){
			alert("1");
		}();
		js对象
		var obj = {		
				name : "小明",
				gender : "男",
				//对象中加对象
				hobby : {
					id : "1",
					ball : "篮球",
				},
				//类里的方法
				work : function(){
					alert("电脑");
				}
			};
			!function f(){
				obj.work();
			}();
			//创建类
			function Company(name){
				this.id = "1";
				this.name = name;
			}
			//new出一个对象/构造函数传值
			var c = new Company("达内");
			//改变类中属性值
			// c.name = "达内";
			(function f(){
				alert(c.name);
			})();
		*/
		//var temp;
		(function f(){
			$.ajax(
				{
					type:"POST",
					url:"/moon/Student/select?pageNum=1&pageSize=2",
					async:false,
					dataType:"json",
					success:function(data){
						alert(JSON.stringify(data));						
					} 
				}		
			);
			alert("1");
		})();
		(function c(){
			alert("2");
		})();
	</script>
</body>
</html>